# -*- coding = utf-8 -*-
# @Time : 2021/3/6 13:24
# @Author : kk_J
# @File: test.py
# @Software: PyCharm

import re
import xlwt


#
#
# classlink3 = "http://www.chinadatastore.cn/product/product935-1.html"
# for page in range(1, 4):
#     classlink3 = re.sub('-\d', '-' + str(page), classlink3)
#     print(classlink3)
def saveData(datalist, savepath):
    china_data_city = xlwt.Workbook(encoding="utf-8")
    worksheet = china_data_city.add_sheet('sheet1', cell_overwrite_ok=True)
    for index, value in enumerate(datalist):
        worksheet.write(0, index, value)
    china_data_city.save(savepath)
    print("数据已保存")


saveData([1, 1, 1, 1], "test.xls")
print(1)
